<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html>
<html>
<head>
<title>用户信息列表</title>
<style type="text/css">
  table {
    border-collapse: collapse;
    width: 75%;
    border: 1px solid;
  }
  td {
    border-width: 1px;
    border-style: solid;
  }
</style>
</head>
<body>
  <div align="center">
    <s:include value="add.jsp" />
    <table>
      <tr>
        <th>用户ID</th>
        <th>用户名称</th>
        <th>性别</th>
        <th>出生日期</th>
        <th>居住地址</th>
        <th>操作</th>
      </tr>
      <s:if test="persons.size>0">
        <s:iterator value="persons" var="obj">
          <tr>
            <td><s:property value="#obj.personId" /></td>
            <td><s:property value="#obj.personName" /></td>
            <td>
              <s:if test="#obj.sex==1">
                <s:property value="'男'" />
              </s:if>
              <s:else>
                <s:property value="'女'" />
              </s:else>
            </td>
            <td><s:property value="#obj.birthdate" /></td>
            <td><s:property value="#obj.address" /></td>
            <td>
              <s:a href="personAction!edit?person.personId=%{#obj.personId}">编辑</s:a>
              <s:a href="personAction!remove?person.personId=%{#obj.personId}">移除</s:a>
            </td>
          </tr>
        </s:iterator>
      </s:if>
    </table>
  </div>
</body>
</html>
